package com.kfm.login.model.response;

import com.kfm.login.model.KfmUser;
import com.kfm.login.model.Menu;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
public class UserVO implements Serializable {

    private Integer id;

    private String username;

    private String phoneNumber;

    private String email;

    private String nickname;

    private Date loginTime;
    private List<Menu> menus;

    public UserVO(KfmUser user) {
        this.id = user.getId();
        this.username = user.getUsername();
        this.email = user.getEmail();
        this.phoneNumber = user.getPhoneNumber();
        this.nickname = user.getNickname();
        this.loginTime = user.getLoginTime();
        this.menus = user.getMenus();
    }

}
